//
//  MyCustomButton.m
//  U9WatchGame
//
//  Created by uuu9 on 16/1/8.
//  Copyright © 2016年 Jason. All rights reserved.
//

#import "MyCustomButton.h"

@implementation MyCustomButton

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self addTarget:self action:@selector(clickMethod:) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

- (void)clickMethod:(UIButton *)sender{
    _block(self.customID,sender);
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
